<?php
require('../../../public/connection.php');
require('../../../class/Mysql.php');
$data = json_decode(file_get_contents('php://input'), true);
if (empty($data["page"]) || empty($data["pageSize"])) {
    die(json_encode(array("code" => 400, "msg" => "格式错误", "data" => null)));
}
$select_data = new Mysql();
$result = $select_data->selectDataByPage("foodheats", $data["pageSize"] * ($data["page"] - 1), $data["pageSize"],"type");
die(json_encode($result));